//  @ Project : GagalPanen
//  @ File Name : sprites.hpp
//  @ Date : 3/9/2011
//  @ Author : 
//
//


#if !defined(_SPRITES_H)
#define _SPRITES_H

#include<vector>

#include "sprite.hpp"

class Sprites {
public:
  // new game constructor
  Sprites(GameInterface* game);

  // load game constructor
  Sprites(GameInterface* game, std::ifstream& is);

  virtual void save(std::ofstream& os);
  
  virtual ~Sprites();
  void advanceDay();
  void advanceTime();

  /*
   Check if the corresponding cell contains a non-sleeping sprite
   */
  bool containsSpriteAt(Cell* cell);

  /*
   Retrieve it
   */
  Sprite* getOneSpriteAt(Cell* cell);

  int getSpritesCount();

  /*
   1 based indexing
   */
  Sprite* getSpriteOfIndex(int index);
private:
  GameInterface* game_;
  std::vector<Sprite * > sprites_;
  
};

#endif  //_SPRITES_H
